#include<bits/stdc++.h>
using namespace std;
int n,samee,difff,frontt,backk,restt;
int monster[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>monster[i];
    sort(monster+1,monster+n+1);
    samee=1;
    for(int i=2;i<=n;i++){
        if(monster[i]==monster[i-1]){
            if(restt>0) restt--;
            samee++;
        }
        else{
            restt+=samee-1;
            samee=1;
        }
    }
    cout<<(restt+samee)<<endl;
    return 0;
}
